@*
* Copyright 2015 Yahoo Inc. Licensed under the Apache License, Version 2.0
* See accompanying LICENSE file.
*@
@import scalaz.{\/}
@(errorOrClusters: kafka.manager.ApiError \/ kafka.manager.model.ActorModel.KMClusterList
)(implicit af: features.ApplicationFeatures, messages: play.api.i18n.Messages, menus: models.navigation.Menus, request:RequestHeader)

@main(
    "CMAK",
    views.html.navigation.defaultMenu(views.html.navigation.menuNav("Cluster","List",menus.indexMenu)),
    views.html.navigation.breadCrumbs(models.navigation.BreadCrumbs.withView("Clusters"))) {
<div class="col-md-6 un-pad-me">
    <div class="card">
        <div class="card-header"><h3>Clusters</h3></div>
        <div class="card-body">
        @errorOrClusters.fold(views.html.errors.onApiError(_), cl => {
            views.html.cluster.clusterList(cl.active)
        })
        @errorOrClusters.fold( _ => Html(""), cl => {
            views.html.cluster.pendingClusterList(cl.pending)
        })
        </div>
    </div>
</div>
}
